package com.tencreat.domain.mall;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.annotation.Excel;
import com.tencreat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;


/**
 * 商品拼团对象 mall_goods_collage
 *
 * @author tencreat
 * @date 2022-01-24
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
@TableName("mall_goods_collage")
public class MallGoodsCollage extends BaseEntity<MallGoodsCollage> {
    private static final long serialVersionUID = 1L;


    /** $column.columnComment */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;


    /** 商品id */
    @Excel(name = "商品id")
    @ApiModelProperty(value= "商品id")
    @TableField("`goods_id`")
    private Long goodsId;


    /** 商品编号 */
    @Excel(name = "商品编号")
    @ApiModelProperty(value= "商品编号")
    @TableField("`goods_sn`")
    private String goodsSn;


    /** 货品id */
    @Excel(name = "货品id")
    @ApiModelProperty(value= "货品id")
    @TableField("`product_id`")
    private Long productId;


    /** 拼团价 */
    @Excel(name = "拼团价")
    @ApiModelProperty(value= "拼团价")
    @TableField("`collage_price`")
    private BigDecimal collagePrice;


    /** 原价 */
    @Excel(name = "原价")
    @ApiModelProperty(value= "原价")
    @TableField("`origin_price`")
    private BigDecimal originPrice;


    /** 开始时间 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`start_time`")
    private LocalDateTime startTime;


    /** 截止时间 */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "截止时间", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField("`end_time`")
    private LocalDateTime endTime;


    /** 库存 */
    @Excel(name = "库存")
    @ApiModelProperty(value= "库存")
    @TableField("`inventory`")
    private Long inventory;


    /** 已拼团数量 */
    @Excel(name = "已拼团数量")
    @ApiModelProperty(value= "已拼团数量")
    @TableField("`number_get`")
    private Long numberGet;


    /** 剩余数量 */
    @Excel(name = "剩余数量")
    @ApiModelProperty(value= "剩余数量")
    @TableField("`number_remaining`")
    private Long numberRemaining;


    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @ApiModelProperty(value= "显示顺序")
    @TableField("`sort`")
    private Long sort;


    /** 参与人数*/
    @Excel(name = "参与人数")
    @ApiModelProperty(value= "参与人数")
    @TableField("`collage_count`")
    private Long collageCount;

    /** 拼团时长(首次发起算) 单位:小时 */
    @Excel(name = "拼团时长(首次发起算) 单位:小时")
    @ApiModelProperty(value= "拼团时长(首次发起算) 单位:小时")
    @TableField("`collage_time`")
    private BigDecimal collageTime;


    /** 状态 0关闭 1开始 */
    @Excel(name = "状态 0关闭 1开始")
    @ApiModelProperty(value= "状态 0关闭 1开始")
    @TableField("`status`")
    private Integer status;


    /** 专区id */
    @Excel(name = "专区id")
    @ApiModelProperty(value= "专区id")
    @TableField("`zone_id`")
    private Long zoneId;


    /** 删除标志（0代表存在 2代表删除） */
    @TableLogic
    @TableField("`del_flag`")
    private String delFlag;


    /** 租户ID */
    @Excel(name = "租户ID")
    @ApiModelProperty(value= "租户ID")
    @TableField("`tenant_id`")
    private Long tenantId;

    @ApiModelProperty("活动编号")
    private String activeSn;

    @ApiModelProperty(value= "是否分佣 1-是 0-否")
    private Integer isBonus;
}
